#include "tcp_server.h"

int main(int argc, char** argv)
{
    uint8_t cnt = 0;
    TcpSerVer server;

    server.Init("127.0.0.1", 8899);
    server.Start();
    server.RegCallback([](void* param, DataPacket& data){
        printf("get data\n");
    }, nullptr);

    while (true)
    {
        // printf("cnt:%d\n",cnt);
        std::this_thread::sleep_for(std::chrono::milliseconds(20));
    }

    server.Stop();
    printf("over!!!\n");

    return 0;
}